<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace Album\Form;
use Zend\Form\Form;

class AlbumForm extends Form
{
    public function __construct($name = null) {
        parent::__construct('album');
        
        $this->add(array(
           'name' => 'id' ,
           'type' => 'hidden'
        ));
        $this->add(array(
            'name' => 'title' ,
            'type' => 'text' ,
            'options' => array(
              'label' => 'Title'  
            ),
            'attributes' => array(              
              'class' => 'form-control',
              'ng-model' => 'album.title'                
            ),
        ));
        $this->add(array(
            'name' => 'artist' ,
            'type' => 'text' ,
            'options' => array(
                'label' => 'Artist'
            ),
            'attributes' => array(
              'class' => 'form-control' ,
              'ng-model' => 'album.artist'    
            ),
        ));
        $this->add(array(
            'name' => 'submit' ,
            'type' => 'submit' ,
            'attributes' => array(
                'value' => 'Go' ,
                'id' => 'submitbutton'
            )
        ));
    }
}